package com.beecloud.microservice.user.commom;


import com.beecloud.microservice.user.domain.error.ParameterWrongException;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.StringUtils;

public class EncryptUtils {
    public static String encryptPassword(String password) throws ParameterWrongException {
        if(StringUtils.isBlank(password))
            throw new ParameterWrongException("Encrypt string must be not null or empty.");
        return DigestUtils.md5Hex(password);
    }

}
